#include <iostream>
#include "EpollServer.hpp"
#include <memory>
using namespace std;


void Usage(const string& s)
{
    cout << "\n\tUsage: " + s + " port\n\n"; 
}
int main(int argc,char* argv[]){

    if(argc != 2)
    {   
        Usage(argv[0]);
        return -1;
    }
    
    unique_ptr<EpollServer> _svr = std::make_unique<EpollServer>(atoi(argv[1]));

    _svr->InitServer();
    _svr->loop();

    return 0;
}